// -----------------------------------------------------------------------------
// Pre-decrypted ROMsets



// Garou (Non-encrypted P-ROMs, decrypted C-ROMs)

static struct BurnRomInfo garounRomDesc[] = {
	{"253-sma.bin"  , 0x040000, 0x98bc93dc, 0x10}, //  0 68K code
	{"253-ep1.p1"   , 0x200000, 0xea3171a4, 0x10}, //  1
	{"253-ep2.p2"   , 0x200000, 0x382f704b, 0x10}, //  2
	{"253-ep3.p3"   , 0x200000, 0xe395bfdd, 0x10}, //  3
	{"253-ep4.p4"   , 0x200000, 0xda92c08e, 0x10}, //  4

	{"motwn_c1.bin" , 0x800000, 0x497be3f2,    1}, //  5 Sprite data
	{"motwn_c2.bin" , 0x800000, 0x6a9e95ca,    1}, //  6
	{"motwn_c3.bin" , 0x800000, 0x39373d2f,    1}, //  7
	{"motwn_c4.bin" , 0x800000, 0x4de23f6c,    1}, //  8
	{"motwn_c5.bin" , 0x800000, 0x16634ba5,    1}, //  9
	{"motwn_c6.bin" , 0x800000, 0x95671ffd,    1}, // 10
	{"motwn_c7.bin" , 0x800000, 0xe36ce77f,    1}, // 11
	{"motwn_c8.bin" , 0x800000, 0xddbd1096,    1}, // 12

	{"253-m1.bin"   , 0x040000, 0x36a806be, 0x10}, // 13 Z80 code

	{"253-v1.bin"   , 0x400000, 0x263e388c,    2}, // 14 Sound data
	{"253-v2.bin"   , 0x400000, 0x2c6bc7be,    2}, // 15
	{"253-v3.bin"   , 0x400000, 0x0425b27d,    2}, // 16
	{"253-v4.bin"   , 0x400000, 0xa54be8a9,    2}, // 17
};

STDROMPICKEXT(garoun, garoun, neogeo);
STD_ROM_FN(garoun);

struct BurnDriver BurnDrvGaroun = {
	{"garoun", "Garou: Mark Of The Wolves", "Non-encrypted P-ROMs, decrypted C-ROMs", "SNK", "Neo Geo", "1999", "garou", "neogeo"},
	BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_SNK_NEOGEO | HARDWARE_SNK_SRAM | HARDWARE_SNK_SMA_PROTECTION,
	NULL, garounRomInfo, garounRomName, neogeoInputInfo, neogeoDIPInfo,
	garouInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
	nNeoScreenWidth, 224, 4, 3
};


// Prehistoric Isle 2 (Non-encrypted P-ROMs, decrypted C-ROMs)

static struct BurnRomInfo preisl2nRomDesc[] = {
	{"255-p1.bin", 0x100000, 0xDFA3C0F3, 0x10}, //  0 68K code
	{"255-p2.bin", 0x400000, 0x42050B80, 0x10}, //  1

	{"pi2n_c1.bin",0x800000, 0x50fd785e,    1}, //  2 Sprite data
	{"pi2n_c2.bin",0x800000, 0xab913f1e,    1}, //  3
	{"pi2n_c3.bin",0x800000, 0xbc0ee75c,    1}, //  4
	{"pi2n_c4.bin",0x800000, 0x29908823,    1}, //  5
	{"pi2n_c5.bin",0x800000, 0x83c56bca,    1}, //  6
	{"pi2n_c6.bin",0x800000, 0x59e0e805,    1}, //  7

	{"255-m1.bin", 0x020000, 0x8EFD4014, 0x10}, // 10 Z80 code

	{"255-v1.bin", 0x400000, 0x5A14543D,    2}, // 11 Sound data
	{"255-v2.bin", 0x200000, 0x6610D91A,    2}, // 12
};

STDROMPICKEXT(preisl2n, preisl2n, neogeo);
STD_ROM_FN(preisl2n);

struct BurnDriver BurnDrvpreisl2n = {
	{"preisl2n", "Prehistoric Isle 2", "Non-encrypted P-ROMs, decrypted C-ROMs", "Yumekobo", "Neo Geo", "1999", "preisle2", "neogeo"},
	BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_SNK_NEOGEO | HARDWARE_SNK_SRAM,
	NULL, preisl2nRomInfo, preisl2nRomName, neogeoInputInfo, neogeoDIPInfo,
	preisle2Init, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
	nNeoScreenWidth, 224, 4, 3
};

// Strikers 1945 plus (Non-encrypted P-ROMs, decrypted C-ROMs)

static struct BurnRomInfo s1945pnRomDesc[] = {
	{"254-p1.bin",	0x100000, 0xFF8EFCFF, 0x10}, //  0 68K code
	{"254-p2.bin",	0x400000, 0xEFDFD4DD, 0x10}, //  1

	{"s45pn_c1.bin",0x800000, 0x7b6902f9,    1}, //  2 Sprite data
	{"s45pn_c2.bin",0x800000, 0x51bd4252,    1}, //  3
	{"s45pn_c3.bin",0x800000, 0xa38993e4,    1}, //  4
	{"s45pn_c4.bin",0x800000, 0xd5696530,    1}, //  5
	{"s45pn_c5.bin",0x800000, 0x28764bd6,    1}, //  6
	{"s45pn_c6.bin",0x800000, 0x9931bdf1,    1}, //  7
	{"s45pn_c7.bin",0x800000, 0x6e12afcd,    1}, //  8
	{"s45pn_c8.bin",0x800000, 0x178d4684,    1}, //  9

	{"254-m1.bin",	0x020000, 0x994B4487, 0x10}, // 10 Z80 code

	{"254-v1.bin",	0x400000, 0x844F58FB,    2}, // 11 Sound data
	{"254-v2.bin",	0x400000, 0xD9A248F0,    2}, // 12
	{"254-v3.bin",	0x400000, 0x0B0D2D33,    2}, // 13
	{"254-v4.bin",	0x400000, 0x6D13DC91,    2}, // 14
};

STDROMPICKEXT(s1945pn, s1945pn, neogeo);
STD_ROM_FN(s1945pn);

struct BurnDriver BurnDrvs1945pn = {
	{"s1945pn", "Strikers 1945 plus", "Non-encrypted P-ROMs, decrypted C-ROMs", "Psikyo", "Neo Geo", "1999", "s1945p", "neogeo"},
	BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_SNK_NEOGEO | HARDWARE_SNK_SWAPC,
	NULL, s1945pnRomInfo, s1945pnRomName, neogeoInputInfo, neogeoDIPInfo,
	s1945pInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
	nNeoScreenWidth, 224, 4, 3
};


//	The King of Fighters 2002

static struct BurnRomInfo kof2002ndRomDesc[] = {
	{"265-p1d.bin", 0x100000, 0x9ede7323, 0x10}, //  0 68K code
	{"265-p2d.bin", 0x400000, 0x432fdf53, 0x10}, //  1

	{"265-s1d.bin", 0x020000, 0xe0eaaba3,    1}, //  1 Text data

	{"265-c1d.bin", 0x800000, 0x7efa6ef7,    1}, //  2 Sprite data
	{"265-c2d.bin", 0x800000, 0xaa82948b,    1}, //  3
	{"265-c3d.bin", 0x800000, 0x959fad0b,    1}, //  5
	{"265-c4d.bin", 0x800000, 0xefe6a468,    1}, //  6
	{"265-c5d.bin", 0x800000, 0x74bba7c6,    1}, //  7
	{"265-c6d.bin", 0x800000, 0xe20d2216,    1}, //  8
	{"265-c7d.bin", 0x800000, 0x8a5b561c,    1}, //  9
	{"265-c8d.bin", 0x800000, 0xbef667a3,    1}, //  10

	{"265-m1d.bin", 0x020000, 0xAB9D360E, 0x10}, // 11 Z80 code

	{"265-v1d.bin", 0x400000, 0x13d98607,    2}, //  12 Sound data
	{"265-v2d.bin", 0x400000, 0x9cf74677,    2}, //  13
	{"265-v3d.bin", 0x400000, 0x8e9448b5,    2}, //  14
	{"265-v4d.bin", 0x400000, 0x067271b5,    2}, //  15
}; 
STDROMPICKEXT(kof2002nd, kof2002nd, neogeo); 
STD_ROM_FN(kof2002nd);


struct BurnDriver BurnDrvkof2002nd = {

	{"kof2002nd", "The King Of Fighters '2002", NULL, "SNK", "Neo Geo", "2002", "kof2002" , "neogeo"},
	BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_SNK_NEOGEO,
	NULL, kof2002ndRomInfo, kof2002ndRomName, neogeoInputInfo, neogeoDIPInfo,
	NeoInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
	nNeoScreenWidth, 224, 4, 3
};
// Metal Slug 5

static struct BurnRomInfo mslug5ndRomDesc[] = {
	{"mslug5_p1.rom"   , 0x600000, 0x02247965, 0x10}, //  0 68K code

	{"268_s1.rom"   , 0x020000, 0x64952683,    1}, //  1 Text layer tiles
	{"268_c1.rom"   , 0x800000, 0x969C0D62,    1}, //  2 Sprite data
	{"268_c2.rom"   , 0x800000, 0xC69AE867,    1}, //  3
	{"268_c3.rom"   , 0x800000, 0xD7BEAEAF,    1}, //  4
	{"268_c4.rom"   , 0x800000, 0xE1B1131B,    1}, //  5
	{"268_c5.rom"   , 0x800000, 0x2FA1A5AD,    1}, //  6
	{"268_c6.rom"   , 0x800000, 0x6DE89589,    1}, //  7
	{"268_c7.rom"   , 0x800000, 0x97BD0C0A,    1}, //  8
	{"268_c8.rom"   , 0x800000, 0xC0D5BC20,    1}, //  9

	{"268_m1.rom"   , 0x020000, 0x6FA01C9A, 0x10}, // 10 Z80 code

	{"268_v1.rom"   , 0x400000, 0xC3540E0D,    2}, // 11 Sound data
	{"268_v2.rom"   , 0x400000, 0x077BD2F4,    2}, // 12
	{"268_v3.rom"   , 0x400000, 0x39B14567,    2}, // 13
	{"268_v4.rom"   , 0x400000, 0x969FF3B2,    2}, // 14
};

STDROMPICKEXT(mslug5nd, mslug5nd, neogeo);
STD_ROM_FN(mslug5nd);


struct BurnDriver BurnDrvmslug5nd = {
	{"mslug5nd", "Metal Slug 5", NULL, "SNK", "Neo Geo", "2003", NULL, "neogeo"},
	BDF_GAME_WORKING, 2, HARDWARE_SNK_NEOGEO,
	NULL, mslug5ndRomInfo, mslug5ndRomName, neogeoInputInfo, neogeoDIPInfo,
	NeoInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
	nNeoScreenWidth, 224, 4, 3
};

// Power insctinct matrimelee

static struct BurnRomInfo pimRomDesc[] = {
	{"266-p1.bin"   , 0x100000, 0x0, 0x10}, //  0 68K code
	{"266-p2.bin"   , 0x400000, 0x0, 0x10}, //  0 68K code

	{"266-s1.bin"   , 0x020000, 0x0,    1}, //  1 Text layer tiles

	{"266-c1.bin"   , 0x800000, 0x0,    1}, //  2 Sprite data
	{"266-c2.bin"   , 0x800000, 0x0,    1}, //  3
	{"266-c3.bin"   , 0x800000, 0x0,    1}, //  4
	{"266-c4.bin"   , 0x800000, 0x0,    1}, //  5
	{"266-c5.bin"   , 0x800000, 0x0,    1}, //  6
	{"266-c6.bin"   , 0x800000, 0x0,    1}, //  7
	{"266-c7.bin"   , 0x800000, 0x0,    1}, //  8
	{"266-c8.bin"   , 0x800000, 0x0,    1}, //  9

	{"266-m1.bin"   , 0x040000, 0x0, 0x10}, // 10 Z80 code

	{"266-v1.bin"   , 0x400000, 0x0,    2}, // 11 Sound data
	{"266-v2.bin"   , 0x400000, 0x0,    2}, // 12
	{"266-v3.bin"   , 0x400000, 0x0,    2}, // 13
	{"266-v4.bin"   , 0x400000, 0x0,    2}, // 14
};

STDROMPICKEXT(pim, pim, neogeo);
STD_ROM_FN(pim);


struct BurnDriver BurnDrvPim = {
	{"pim", "Power Instinct Matrimelee ", NULL, "SNK", "Neo Geo", "2003", NULL, "neogeo"},
	BDF_GAME_WORKING, 2, HARDWARE_SNK_NEOGEO,
	NULL, pimRomInfo, pimRomName, neogeoInputInfo, neogeoDIPInfo,
	NeoInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
	nNeoScreenWidth, 224, 4, 3
};

// King of Fighter 2001 'd

static struct BurnRomInfo kof2001RomDesc[] = {
	{"262-p1.bin"   , 0x100000, 0x9381750D, 0x10}, //  0 68K code
	{"262-p2.bin"   , 0x400000, 0x8e0d8329, 0x10}, //  0 68K code

	{"262-c1.bin"   , 0x800000, 0x99cc785a,    1}, //  2 Sprite data
	{"262-c2.bin"   , 0x800000, 0x50368cbf,    1}, //  3
	{"262-c3.bin"   , 0x800000, 0xfb14ff87,    1}, //  4
	{"262-c4.bin"   , 0x800000, 0x4397faf8,    1}, //  5
	{"262-c5.bin"   , 0x800000, 0x91f24be4,    1}, //  6
	{"262-c6.bin"   , 0x800000, 0xa31e4403,    1}, //  7
	{"262-c7.bin"   , 0x800000, 0x54d9d1ec,    1}, //  8
	{"262-c8.bin"   , 0x800000, 0x59289a6b,    1}, //  9

	{"262-m1.bin"   , 0x020000, 0x73C1F5B0, 0x10}, // 10 Z80 code

	{"262-v1.bin"   , 0x400000, 0x83d49ecf,    2}, // 11 Sound data
	{"262-v2.bin"   , 0x400000, 0x003f1843,    2}, // 12
	{"262-v3.bin"   , 0x400000, 0x2ae38dbe,    2}, // 13
	{"262-v4.bin"   , 0x400000, 0x26ec4dd9,    2}, // 14
};

STDROMPICKEXT(kof2001, kof2001, neogeo);
STD_ROM_FN(kof2001);

void __fastcall kof2001WriteWordBankswitch(unsigned int sekAddress, unsigned short wordValue)
{
	if (sekAddress == 0x2FFFEC) {
		static unsigned int bankoffset[64] = {
			0x000000, 0x100000, 0x200000, 0x300000, // 00
			0x3f7800, 0x4f7800, 0x3ff800, 0x4ff800, // 04
			0x407800, 0x507800, 0x40f800, 0x50f800, // 08
			0x416800, 0x516800, 0x41d800, 0x51d800, // 12
			0x424000, 0x524000, 0x523800, 0x623800, // 16
			0x526000, 0x626000, 0x528000, 0x628000, // 20
			0x52a000, 0x62a000, 0x52b800, 0x62b800, // 24
			0x52d000, 0x62d000, 0x52e800, 0x62e800, // 28
			0x618000, 0x619000, 0x61a000, 0x61a800, // 32
		};

		// Unscramble bank number
		int nBank =
			(((wordValue >> 15) & 1) << 0) +
			(((wordValue >> 14) & 1) << 1) +
			(((wordValue >>  7) & 1) << 2) +
			(((wordValue >>  3) & 1) << 3) +
			(((wordValue >> 10) & 1) << 4) +
			(((wordValue >>  5) & 1) << 5);

		if (bankoffset[nBank] != nNeo68KROMBank) {
			nNeo68KROMBank = bankoffset[nBank];
			SekMapMemory(Neo68KROM02 + nNeo68KROMBank,			  0x200000, 0x2FE3FF, SM_ROM);
			SekMapMemory(Neo68KROM02 + nNeo68KROMBank + 0x0FE800, 0x2FE800, 0x2FFBFF, SM_ROM);
		}
	}
}

static int kof2001Init()
{
	nNeoTextROMSize = 0x080000;
	nNeoProtectionXor = 0x1e;

	return NeoInit();
}
struct BurnDriver BurnDrvkof2001 = {
	{"kof2001", "The King Of Fighters '2001", NULL, "SNK", "Neo Geo", "2001", NULL , "neogeo"},
	BDF_GAME_WORKING , 2, HARDWARE_SNK_NEOGEO | HARDWARE_SNK_ENCRYPTED_B,
	NULL, kof2001RomInfo, kof2001RomName, neogeoInputInfo, neogeoDIPInfo,
	kof2001Init, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
	nNeoScreenWidth, 224, 4, 3
};

// Snk Vs Capcom  Chaos

static struct BurnRomInfo svcchaosRomDesc[] = {
	{"269-p1.bin"   , 0x600000, 0x9CFE4EDD, 0x10}, //  0 68K code

	{"269-s1.bin"   , 0x020000, 0x3334AC31,    1}, //  1 Text layer tiles

	{"269-c1.bin"   , 0x800000, 0x465D473B,    1}, //  2 Sprite data
	{"269-c2.bin"   , 0x800000, 0x3EB28F78,    1}, //  3
	{"269-c3.bin"   , 0x800000, 0xF4D4AB2B,    1}, //  4
	{"269-c4.bin"   , 0x800000, 0xA69D523A,    1}, //  5
	{"269-c5.bin"   , 0x800000, 0xBA2A7892,    1}, //  6
	{"269-c6.bin"   , 0x800000, 0x37371CA1,    1}, //  7
	{"269-c7.bin"   , 0x800000, 0x56AC5FB9,    1}, //  8
	{"269-c8.bin"   , 0x800000, 0xDE99E613,    1}, //  9

	{"269-m1d.bin"   , 0x020000, 0x7F01DAC5, 0x10}, // 10 Z80 code

	{"269-v1.bin"   , 0x400000, 0xE7203930,    2}, // 11 Sound data
	{"269-v2.bin"   , 0x400000, 0x675159C3,    2}, // 12
	{"269-v3.bin"   , 0x400000, 0xF8810665,    2}, // 13
	{"269-v4.bin"   , 0x400000, 0xB57B4EA3,    2}, // 14
};

STDROMPICKEXT(svcchaos, svcchaos, neogeo);
STD_ROM_FN(svcchaos);

struct BurnDriver BurnDrvSvcChaos = {
	{"svcchaos", "Snk Vs Capcom Chaos", NULL, "SNK", "Neo Geo", "2003", NULL, "neogeo"},
	BDF_GAME_WORKING, 2, HARDWARE_SNK_NEOGEO | HARDWARE_SNK_SWAPP,
	NULL, svcchaosRomInfo, svcchaosRomName, neogeoInputInfo, neogeoDIPInfo,
	NeoInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
	nNeoScreenWidth, 224, 4, 3
};


// Snk Vs Capcom  Plus


static struct BurnRomInfo svcplusRomDesc[] = {
	{"svc_p1.rom"   , 0x600000, 0x0, 0x10}, //  0 68K code

	{"svc_s1.rom"   , 0x020000, 0x0,    1}, //  1 Text layer tiles

	{"269-c1.bin"   , 0x800000, 0x465D473B,    1}, //  2 Sprite data
	{"269-c2.bin"   , 0x800000, 0x3EB28F78,    1}, //  3
	{"269-c3.bin"   , 0x800000, 0xF4D4AB2B,    1}, //  4
	{"269-c4.bin"   , 0x800000, 0xA69D523A,    1}, //  5
	{"269-c5.bin"   , 0x800000, 0xBA2A7892,    1}, //  6
	{"269-c6.bin"   , 0x800000, 0x37371CA1,    1}, //  7
	{"269-c7.bin"   , 0x800000, 0x56AC5FB9,    1}, //  8
	{"269-c8.bin"   , 0x800000, 0xDE99E613,    1}, //  9

	{"269-m1d.bin"   , 0x020000, 0x7F01DAC5, 0x10}, // 10 Z80 code

	{"269-v1.bin"   , 0x400000, 0xE7203930,    2}, // 11 Sound data
	{"269-v2.bin"   , 0x400000, 0x675159C3,    2}, // 12
	{"269-v3.bin"   , 0x400000, 0xF8810665,    2}, // 13
	{"269-v4.bin"   , 0x400000, 0xB57B4EA3,    2}, // 14
};

STDROMPICKEXT(svcplus, svcplus, neogeo);
STD_ROM_FN(svcplus);

struct BurnDriver BurnDrvsvcplus = {
	{"svcplus", "Snk vs Capcom Plus", "Full", "SNK", "Neo Geo", "2003", "svcchaos", "neogeo"},
	BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_SNK_NEOGEO | HARDWARE_SNK_SWAPP,
	NULL, svcplusRomInfo, svcplusRomName, neogeoInputInfo, neogeoDIPInfo,
	NeoInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
	nNeoScreenWidth, 224, 4, 3
};

// The King of Fighter's 2003 (Bootleg)

static struct BurnRomInfo kof2003RomDesc[] = {
	{"271-p1.bin"   , 0x400000, 0x92ed6ee3, 0x10}, //  0 68K code
	{"271-p2.bin"	, 0x400000, 0x5d3d8bb3, 0x10}, //  1 68k code

	{"271-s1.bin"   , 0x020000, 0xc47f8ac3,    1}, //  2 Text layer tiles

	{"271-c1d.rom"  , 0x800000, 0xe42fc226,    1}, //  3 Sprite data
	{"271-c2d.rom"  , 0x800000, 0x1b5e3b58,    1}, //  4
	{"271-c3d.rom"  , 0x800000, 0xd334fdd9,    1}, //  5
	{"271-c4d.rom"  , 0x800000, 0x0d457699,    1}, //  6
	{"271-c5d.rom"  , 0x800000, 0x8a91aae4,    1}, //  7
	{"271-c6d.rom"  , 0x800000, 0x9f8674b8,    1}, //  8
	{"271-c7d.rom"  , 0x800000, 0x374ea523,    1}, //  9
	{"271-c8d.rom"  , 0x800000, 0x75211f4d,    1}, //  10

	{"271-m1d.bin"  , 0x080000, 0x0e86af8f, 0x10}, //  11 Z80 code

	{"271-v1d.rom"  , 0x400000, 0xd2b8aa5e,    2}, //  12 Sound data
	{"271-v2d.rom"  , 0x400000, 0x71956ee2,    2}, //  13
	{"271-v3d.rom"  , 0x400000, 0xddbbb199,    2}, //  14
	{"271-v4d.rom"  , 0x400000, 0x01b90c4f,    2}, //  15
};

STDROMPICKEXT(kof2003, kof2003, neogeo);
STD_ROM_FN(kof2003);

static unsigned short kof2003_tbl[0x1000];


unsigned char __fastcall kof2003ReadByteBankSwitch(unsigned int sekAddress)
{
	return *(((unsigned char *)kof2003_tbl)+((sekAddress^1)-0x2fe000));
}


unsigned short __fastcall kof2003ReadWordBankSwitch(unsigned int sekAddress)
{
	return kof2003_tbl[(sekAddress-0x2fe000)/2];
}

static void kof2003WriteBankSwitch(unsigned int sekAddress,unsigned short wordValue,unsigned short valueMask)
{
	int address=(sekAddress-0x2fe000)/2,bankaddress;
	kof2003_tbl[address]=(wordValue&valueMask)|(~valueMask&kof2003_tbl[address]);
	if(address!=0xff8 && address!=0xff9 ) return;
	bankaddress=(kof2003_tbl[0xff8]>>8)|(kof2003_tbl[0xff9]<<8);
	*(((unsigned char *)kof2003_tbl)+0x1ff0)=0xa0;
	*(((unsigned char *)kof2003_tbl)+0x1ff1)&=0xfe;
	*(((unsigned char *)kof2003_tbl)+0x1ff3)&=0x7f;
	SekMapMemory(Neo68KROM02+bankaddress,0x200000,0x2fdfff,SM_ROM);
	Neo68KROM01[0x58196]=kof2003_tbl[0xff9]&0xff;
}


void __fastcall kof2003WriteWordBankSwitch(unsigned int sekAddress, unsigned short wordValue)
{
	unsigned short valueMask=0xffff;
	kof2003WriteBankSwitch(sekAddress, wordValue, valueMask);
}

void __fastcall kof2003WriteByteBankSwitch(unsigned int sekAddress, unsigned char byteValue)
{
	unsigned short wordValue=0,valueMask=0xff;
	if(!(sekAddress&1)) {
		wordValue=byteValue<<8;
		valueMask<<=8;
	}
	else{
		wordValue=byteValue;
	}
	kof2003WriteBankSwitch(sekAddress,wordValue,valueMask);
}

void kof2003_RomExchange()
{
	memcpy(Neo68KROM01+0x100000,Neo68KROM01,0x600000)  ;
	memcpy(Neo68KROM01,Neo68KROM01+0x700000,0x100000)  ;
	memset(Neo68KROM01+0x700000,0,0x100000);
}

static void kof2003MapHandler()
{
	// Install BankSwitch handler
	SekMapHandler(5,	0x2fe000, 0x2fffff, SM_READ);
	SekSetReadWordHandler(5,  kof2003ReadWordBankSwitch);
	SekSetReadByteHandler(5,  kof2003ReadByteBankSwitch);

	SekMapHandler(5,	0x2fe000, 0x2fffff, SM_WRITE);
	SekSetWriteWordHandler(5, kof2003WriteWordBankSwitch);
	SekSetWriteByteHandler(5, kof2003WriteByteBankSwitch);
}

static int kof2003Init()
{
	int nRet;

	memset(kof2003_tbl,0,0x2000);

	pNeoInitCallback=kof2003_RomExchange;

	nRet=NeoInit();
	if(!nRet)
		kof2003MapHandler();
	return nRet;
}

struct BurnDriver BurnDrvkof2003 = {
	{"kof2003", "The King of Fighters '2003 (not working)", NULL, "SNK", "Neo Geo", "2004", "kof2003", "neogeo"},
	BDF_GAME_WORKING, 2, HARDWARE_SNK_NEOGEO | HARDWARE_SNK_NEWBANKSYSTEM,
	NULL, kof2003RomInfo, kof2003RomName, neogeoInputInfo, neogeoDIPInfo,
	kof2003Init, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
	nNeoScreenWidth, 224, 4, 3
};




static struct BurnRomInfo kof2003fRomDesc[] = {
	{"pmame.bin"    , 0x700000, 0xb110c81e, 0x10}, //  0 68K code
	
	{"271-s1.rom"   , 0x020000, 0x7c7829aa,    1}, //  2 Text layer tiles

	{"271-c1d.rom"  , 0x800000, 0xe42fc226,    1}, //  3 Sprite data
	{"271-c2d.rom"  , 0x800000, 0x1b5e3b58,    1}, //  4
	{"271-c3d.rom"  , 0x800000, 0xd334fdd9,    1}, //  5
	{"271-c4d.rom"  , 0x800000, 0x0d457699,    1}, //  6
	{"271-c5d.rom"  , 0x800000, 0x8a91aae4,    1}, //  7
	{"271-c6d.rom"  , 0x800000, 0x9f8674b8,    1}, //  8
	{"271-c7d.rom"  , 0x800000, 0x374ea523,    1}, //  9
	{"271-c8d.rom"  , 0x800000, 0x75211f4d,    1}, //  10

	{"271-m1d.bin"  , 0x080000, 0x0e86af8f, 0x10}, //  11 Z80 code

	{"271-v1d.rom"  , 0x400000, 0xd2b8aa5e,    2}, //  12 Sound data
	{"271-v2d.rom"  , 0x400000, 0x71956ee2,    2}, //  13
	{"271-v3d.rom"  , 0x400000, 0xddbbb199,    2}, //  14
	{"271-v4d.rom"  , 0x400000, 0x01b90c4f,    2}, //  15
};

STDROMPICKEXT(kof2003f, kof2003f, neogeo);
STD_ROM_FN(kof2003f);



static int kof2003fInit()
{
	int nRet;

	memset(kof2003_tbl,0,0x2000);

//	pNeoInitCallback=kof2003_RomExchange;

	nRet=NeoInit();
	if(!nRet)
		kof2003MapHandler();
	return nRet;
}

struct BurnDriver BurnDrvkof2003f = {
	{"kof2003f", "The King of Fighters '2003", NULL, "SNK", "Neo Geo", "2004", "kof2003", "neogeo"},
	BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_SNK_NEOGEO | HARDWARE_SNK_NEWBANKSYSTEM,
	NULL, kof2003fRomInfo, kof2003fRomName, neogeoInputInfo, neogeoDIPInfo,
	kof2003fInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
	nNeoScreenWidth, 224, 4, 3
};
// kof2k2.zip
static struct BurnRomInfo kof2k2RomDesc[] = {
	{"267-p1.bin"   , 0x100000, 0x0, 0x10}, //  0 68K code
	{"267-p2.bin"   , 0x400000, 0x0, 0x10}, //  0 68K code

	{"267-s1.bin"   , 0x020000, 0x0,    1}, //  1 Text layer tiles

	{"267-c1.bin"   , 0x800000, 0x0,    1}, //  2 Sprite data
	{"267-c2.bin"   , 0x800000, 0x0,    1}, //  3
	{"267-c3.bin"   , 0x800000, 0x0,    1}, //  4
	{"267-c4.bin"   , 0x800000, 0x0,    1}, //  5
	{"267-c5.bin"   , 0x800000, 0x0,    1}, //  6
	{"267-c6.bin"   , 0x800000, 0x0,    1}, //  7
	{"267-c7.bin"   , 0x800000, 0x0,    1}, //  8
	{"267-c8.bin"   , 0x800000, 0x0,    1}, //  9

	{"267-m1.bin"   , 0x020000, 0x0, 0x10}, // 10 Z80 code

	{"267-v1.bin"   , 0x400000, 0x0,    2}, // 11 Sound data
	{"267-v2.bin"   , 0x400000, 0x0,    2}, // 12
	{"267-v3.bin"   , 0x400000, 0x0,    2}, // 13
	{"267-v4.bin"   , 0x400000, 0x0,    2}, // 14
};

STDROMPICKEXT(kof2k2, kof2k2, neogeo);
STD_ROM_FN(kof2k2);

struct BurnDriver BurnDrvkof2k2 = {
	{"kof2k2", "The King of Fighters '2002", "Full", "SNK", "Neo Geo", "2002", "kof2002", "neogeo"},
	BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_SNK_NEOGEO,
	NULL, kof2k2RomInfo, kof2k2RomName, neogeoInputInfo, neogeoDIPInfo,
	NeoInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
	nNeoScreenWidth, 224, 4, 3
};
// kof2k1nd.zip

static struct BurnRomInfo kof2k1ndRomDesc[] = {
	{"262-p1.bin"   , 0x100000, 0x0, 0x10}, //  0 68K code
	{"262-p2.bin"   , 0x400000, 0x0, 0x10}, //  0 68K code

	{"kf2k1_s1.rom"   , 0x020000, 0x0,    1}, //  1 Text layer tiles

	{"kf2k1_c1.rom"   , 0x800000, 0x0,    1}, //  2 Sprite data
	{"kf2k1_c2.rom"   , 0x800000, 0x0,    1}, //  3
	{"kf2k1_c3.rom"   , 0x800000, 0x0,    1}, //  4
	{"kf2k1_c4.rom"   , 0x800000, 0x0,    1}, //  5
	{"kf2k1_c5.rom"   , 0x800000, 0x0,    1}, //  6
	{"kf2k1_c6.rom"   , 0x800000, 0x0,    1}, //  7
	{"kf2k1_c7.rom"   , 0x800000, 0x0,    1}, //  8
	{"kf2k1_c8.rom"   , 0x800000, 0x0,    1}, //  9

	{"262-m1d.bin"   , 0x040000, 0x0, 0x10}, // 10 Z80 code

	{"262-v1.bin"   , 0x400000, 0x0,    2}, // 11 Sound data
	{"262-v2.bin"   , 0x400000, 0x0,    2}, // 12
	{"262-v3.bin"   , 0x400000, 0x0,    2}, // 13
	{"262-v4.bin"   , 0x400000, 0x0,    2}, // 14
};

STDROMPICKEXT(kof2k1nd, kof2k1nd, neogeo);
STD_ROM_FN(kof2k1nd);

struct BurnDriver BurnDrvkof2k1nd = {
	{"kof2k1nd", "The King of Fighters '2001", "Full", "SNK", "Neo Geo", "2001", "kof2001" , "neogeo"},
	BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_SNK_NEOGEO,
	NULL, kof2k1ndRomInfo, kof2k1ndRomName, neogeoInputInfo, neogeoDIPInfo,
	NeoInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
	nNeoScreenWidth, 224, 4, 3
};
// cthd2k3.zip

static struct BurnRomInfo cthd2k3RomDesc[] = {
	{"5003-p1.bin"   , 0x100000, 0x0, 0x10}, //  0 68K code
	{"5003-p2.bin"   , 0x400000, 0x0, 0x10}, //  0 68K code

	{"5003-s1.bin"   , 0x020000, 0x0,    1}, //  1 Text layer tiles

	{"5003-c1.bin"   , 0x800000, 0x0,    1}, //  2 Sprite data
	{"5003-c2.bin"   , 0x800000, 0x0,    1}, //  3
	{"5003-c3.bin"   , 0x800000, 0x0,    1}, //  4
	{"5003-c4.bin"   , 0x800000, 0x0,    1}, //  5
	{"5003-c5.bin"   , 0x800000, 0x0,    1}, //  6
	{"5003-c6.bin"   , 0x800000, 0x0,    1}, //  7
	{"5003-c7.bin"   , 0x800000, 0x0,    1}, //  8
	{"5003-c8.bin"   , 0x800000, 0x0,    1}, //  9

	{"5003-m1.bin"   , 0x020000, 0x0, 0x10}, // 10 Z80 code

	{"262-v1.bin"   , 0x400000, 0x0,    2}, // 11 Sound data
	{"262-v2.bin"   , 0x400000, 0x0,    2}, // 12
	{"262-v3.bin"   , 0x400000, 0x0,    2}, // 13
	{"262-v4.bin"   , 0x400000, 0x0,    2}, // 14
};

STDROMPICKEXT(cthd2k3, cthd2k3, neogeo);
STD_ROM_FN(cthd2k3);

struct BurnDriver BurnDrvcthd2k3 = {
	{"cthd2k3", "Crouching Tiger Hidden Dragon 2003", NULL, "SNK", "Neo Geo", "2001", "cthd2003", "neogeo"},
	BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_SNK_NEOGEO | HARDWARE_SNK_SRAM ,NULL, cthd2k3RomInfo, cthd2k3RomName, neogeoInputInfo, neogeoDIPInfo,
	NeoInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
	nNeoScreenWidth, 224, 4, 3
};


// mslug4nd.zip

static struct BurnRomInfo mslug4ndRomDesc[] = {
	{"263-p1.bin"   , 0x100000, 0x0, 0x10}, //  0 68K code
	{"263-p2.bin"   , 0x400000, 0x0, 0x10}, //  0 68K code

	{"263-s1.bin"   , 0x020000, 0x0,    1}, //  1 Text layer tiles

	{"263-c1.bin"   , 0x800000, 0x0,    1}, //  2 Sprite data
	{"263-c2.bin"   , 0x800000, 0x0,    1}, //  3
	{"263-c3.bin"   , 0x800000, 0x0,    1}, //  4
	{"263-c4.bin"   , 0x800000, 0x0,    1}, //  5
	{"263-c5.bin"   , 0x400000, 0x0,    1}, //  6
	{"263-c6.bin"   , 0x400000, 0x0,    1}, //  7


	{"263-m1.bin"   , 0x020000, 0x0, 0x10}, // 10 Z80 code

	{"263-v1.bin"   , 0x400000, 0x0,    2}, // 11 Sound data
	{"263-v2.bin"   , 0x400000, 0x0,    2}, // 12
	{"263-v3.bin"   , 0x400000, 0x0,    2}, // 13
	{"263-v4.bin"   , 0x400000, 0x0,    2}, // 14
};

STDROMPICKEXT(mslug4nd, mslug4nd, neogeo);
STD_ROM_FN(mslug4nd);

struct BurnDriver BurnDrvmslug4nd = {
	{"mslug4nd", "Metal Slug 4", "Full", "SNK", "Neo Geo", "2001", NULL, "neogeo"},
	BDF_GAME_WORKING, 2, HARDWARE_SNK_NEOGEO,
	NULL, mslug4ndRomInfo, mslug4ndRomName, neogeoInputInfo, neogeoDIPInfo,
	NeoInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
	nNeoScreenWidth, 224, 4, 3
};

// mslug5n.zip

static struct BurnRomInfo mslug5nRomDesc[] = {
	{"268-p1.bin"   , 0x600000, 0x0, 0x10}, //  0 68K code

	{"268-s1.bin"   , 0x020000, 0x0,    1}, //  1 Text layer tiles

	{"268-c1.bin"   , 0x800000, 0x0,    1}, //  2 Sprite data
	{"268-c2.bin"   , 0x800000, 0x0,    1}, //  3
	{"268-c3.bin"   , 0x800000, 0x0,    1}, //  4
	{"268-c4.bin"   , 0x800000, 0x0,    1}, //  5
	{"268-c5.bin"   , 0x800000, 0x0,    1}, //  6
	{"268-c6.bin"   , 0x800000, 0x0,    1}, //  7
	{"268-c7.bin"   , 0x800000, 0x0,    1}, //  8
	{"268-c8.bin"   , 0x800000, 0x0,    1}, //  9

	{"268-m1.bin"   , 0x020000, 0x0, 0x10}, // 10 Z80 code

	{"268-v1.bin"   , 0x400000, 0x0,    2}, // 11 Sound data
	{"268-v2.bin"   , 0x400000, 0x0,    2}, // 12
	{"268-v3.bin"   , 0x400000, 0x0,    2}, // 13
	{"268-v4.bin"   , 0x400000, 0x0,    2}, // 14
};

STDROMPICKEXT(mslug5n, mslug5n, neogeo);
STD_ROM_FN(mslug5n);

struct BurnDriver BurnDrvmslug5n = {
	{"mslug5n", "Metal Slug 5", "Full", "SNK", "Neo Geo", "2003", NULL, "neogeo"},
	BDF_GAME_WORKING, 2, HARDWARE_SNK_NEOGEO,
	NULL, mslug5nRomInfo, mslug5nRomName, neogeoInputInfo, neogeoDIPInfo,
	NeoInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
	nNeoScreenWidth, 224, 4, 3
};

// rotdn.zip

static struct BurnRomInfo rotdnRomDesc[] = {
	{"264-p1.bin"   , 0x800000, 0x0, 0x10}, //  0 68K code

	{"264-s1.bin"   , 0x020000, 0x0,    1}, //  1 Text layer tiles

	{"264-c1.bin"   , 0x800000, 0x0,    1}, //  2 Sprite data
	{"264-c2.bin"   , 0x800000, 0x0,    1}, //  3
	{"264-c3.bin"   , 0x800000, 0x0,    1}, //  4
	{"264-c4.bin"   , 0x800000, 0x0,    1}, //  5
	{"264-c5.bin"   , 0x800000, 0x0,    1}, //  6
	{"264-c6.bin"   , 0x800000, 0x0,    1}, //  7
	{"264-c7.bin"   , 0x800000, 0x0,    1}, //  8
	{"264-c8.bin"   , 0x800000, 0x0,    1}, //  9

	{"264-m1.bin"   , 0x020000, 0x0, 0x10}, // 10 Z80 code

	{"264-v1.bin"   , 0x400000, 0x0,    2}, // 11 Sound data
	{"264-v2.bin"   , 0x400000, 0x0,    2}, // 12
	{"264-v3.bin"   , 0x400000, 0x0,    2}, // 13
	{"264-v4.bin"   , 0x400000, 0x0,    2}, // 14
};

STDROMPICKEXT(rotdn, rotdn, neogeo);
STD_ROM_FN(rotdn);

struct BurnDriver BurnDrvrotdn = {
	{"rotdn", "Rage of the Dragons", "Full", "SNK", "Neo Geo", "2002", "rotd" , "neogeo"},
	BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_SNK_NEOGEO,
	NULL, rotdnRomInfo, rotdnRomName, neogeoInputInfo, neogeoDIPInfo,
	NeoInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
	nNeoScreenWidth, 224, 4, 3
};

// samsho5.zip

static struct BurnRomInfo samsho5RomDesc[] = {
	{"270-p1.bin"   , 0x800000, 0x0, 0x10}, //  0 68K code

	{"270-s1.bin"   , 0x020000, 0x0,    1}, //  1 Text layer tiles

	{"270-c1.bin"   , 0x800000, 0x0,    1}, //  2 Sprite data
	{"270-c2.bin"   , 0x800000, 0x0,    1}, //  3
	{"270-c3.bin"   , 0x800000, 0x0,    1}, //  4
	{"270-c4.bin"   , 0x800000, 0x0,    1}, //  5
	{"270-c5.bin"   , 0x800000, 0x0,    1}, //  6
	{"270-c6.bin"   , 0x800000, 0x0,    1}, //  7
	{"270-c7.bin"   , 0x800000, 0x0,    1}, //  8
	{"270-c8.bin"   , 0x800000, 0x0,    1}, //  9

	{"270-m1.bin"   , 0x020000, 0x0, 0x10}, // 10 Z80 code

	{"270-v1.bin"   , 0x400000, 0x0,    2}, // 11 Sound data
	{"270-v2.bin"   , 0x400000, 0x0,    2}, // 12
	{"270-v3.bin"   , 0x400000, 0x0,    2}, // 13
	{"270-v4.bin"   , 0x400000, 0x0,    2}, // 14
};

STDROMPICKEXT(samsho5, samsho5, neogeo);
STD_ROM_FN(samsho5);

struct BurnDriver BurnDrvsamsho5 = {
	{"samsho5", "Samurai Shodown V", "Full", "SNK", "Neo Geo", "2003", NULL, "neogeo"},
	BDF_GAME_WORKING, 2, HARDWARE_SNK_NEOGEO,
	NULL, samsho5RomInfo, samsho5RomName, neogeoInputInfo, neogeoDIPInfo,
	NeoInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
	nNeoScreenWidth, 224, 4, 3
};

// svcplusn.zip

static struct BurnRomInfo svcplusnRomDesc[] = {
	{"svc_p1.rom"   , 0x600000, 0x0, 0x10}, //  0 68K code

	{"svc_s1.rom"   , 0x020000, 0x0,    1}, //  1 Text layer tiles

	{"svc_c1.rom"   , 0x800000, 0x0,    1}, //  2 Sprite data
	{"svc_c2.rom"   , 0x800000, 0x0,    1}, //  3
	{"svc_c3.rom"   , 0x800000, 0x0,    1}, //  4
	{"svc_c4.rom"   , 0x800000, 0x0,    1}, //  5
	{"svc_c5.rom"   , 0x800000, 0x0,    1}, //  6
	{"svc_c6.rom"   , 0x800000, 0x0,    1}, //  7
	{"svc_c7.rom"   , 0x800000, 0x0,    1}, //  8
	{"svc_c8.rom"   , 0x800000, 0x0,    1}, //  9

	{"svc-m1.rom"   , 0x020000, 0x0, 0x10}, // 10 Z80 code

	{"svc-v1.rom"   , 0x400000, 0x0,    2}, // 11 Sound data
	{"svc-v2.rom"   , 0x400000, 0x0,    2}, // 12
	{"svc-v3.rom"   , 0x400000, 0x0,    2}, // 13
	{"svc-v4.rom"   , 0x400000, 0x0,    2}, // 14
};

STDROMPICKEXT(svcplusn, svcplusn, neogeo);
STD_ROM_FN(svcplusn);

struct BurnDriver BurnDrvsvcplusn = {
	{"svcplusn", "Snk VS Capcom Plus", "Full", "SNK", "Neo Geo", "2003", "svcchaos" , "neogeo"},
	BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_SNK_NEOGEO,
	NULL, svcplusnRomInfo, svcplusnRomName, neogeoInputInfo, neogeoDIPInfo,
	NeoInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
	nNeoScreenWidth, 224, 4, 3
};

// kof99nd.zip

static struct BurnRomInfo kof99ndRomDesc[] = {
	{"kf99n_p1.rom"   , 0x100000, 0x0, 0x10}, //  0 68K code
	{"kf99n_p2.rom"   , 0x400000, 0x0, 0x10}, //  0 68K code

	{"kf99n_s1.rom"   , 0x020000, 0x0,    1}, //  1 Text layer tiles

	{"kf99n_c1.rom"   , 0x800000, 0x0,    1}, //  2 Sprite data
	{"kf99n_c2.rom"   , 0x800000, 0x0,    1}, //  3
	{"kf99n_c3.rom"   , 0x800000, 0x0,    1}, //  4
	{"kf99n_c4.rom"   , 0x800000, 0x0,    1}, //  5
	{"kf99n_c5.rom"   , 0x800000, 0x0,    1}, //  6
	{"kf99n_c6.rom"   , 0x800000, 0x0,    1}, //  7
	{"kf99n_c7.rom"   , 0x800000, 0x0,    1}, //  8
	{"kf99n_c8.rom"   , 0x800000, 0x0,    1}, //  9

	{"251-m1.bin"   , 0x020000, 0x0, 0x10}, // 10 Z80 code

	{"251-v1.bin"   , 0x400000, 0x0,    2}, // 11 Sound data
	{"251-v2.bin"   , 0x400000, 0x0,    2}, // 12
	{"251-v3.bin"   , 0x400000, 0x0,    2}, // 13
	{"251-v4.bin"   , 0x200000, 0x0,    2}, // 14
};

STDROMPICKEXT(kof99nd, kof99nd, neogeo);
STD_ROM_FN(kof99nd);

struct BurnDriver BurnDrvkof99nd = {
	{"kof99nd", "The King of Fighters '99", "Full", "SNK", "Neo Geo", "1999","kof99", "neogeo"},
	BDF_GAME_WORKING, 2, HARDWARE_SNK_NEOGEO,
	NULL, kof99ndRomInfo, kof99ndRomName, neogeoInputInfo, neogeoDIPInfo,
	NeoInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
	nNeoScreenWidth, 224, 4, 3
};

// kof2knd

static struct BurnRomInfo kof2kndRomDesc[] = {
	{"257-p1n.bin"   , 0x100000, 0x0, 0x10}, //  0 68K code
	{"257-p2n.bin"   , 0x400000, 0x0, 0x10}, //  0 68K code

	{"kof2k_s1.rom"   , 0x020000, 0x0,    1}, //  1 Text layer tiles

	{"kof2k_c1.rom"   , 0x800000, 0x0,    1}, //  2 Sprite data
	{"kof2k_c2.rom"   , 0x800000, 0x0,    1}, //  3
	{"kof2k_c3.rom"   , 0x800000, 0x0,    1}, //  4
	{"kof2k_c4.rom"   , 0x800000, 0x0,    1}, //  5
	{"kof2k_c5.rom"   , 0x800000, 0x0,    1}, //  6
	{"kof2k_c6.rom"   , 0x800000, 0x0,    1}, //  7
	{"kof2k_c7.rom"   , 0x800000, 0x0,    1}, //  8
	{"kof2k_c8.rom"   , 0x800000, 0x0,    1}, //  9

	{"257-m1d.bin"   , 0x040000, 0x0, 0x10}, // 10 Z80 code

	{"257-v1.bin"   , 0x400000, 0x0,    2}, // 11 Sound data
	{"257-v2.bin"   , 0x400000, 0x0,    2}, // 12
	{"257-v3.bin"   , 0x400000, 0x0,    2}, // 13
	{"257-v4.bin"   , 0x400000, 0x0,    2}, // 14
};

STDROMPICKEXT(kof2knd, kof2knd, neogeo);
STD_ROM_FN(kof2knd);

struct BurnDriver BurnDrvkof2knd = {
	{"kof2knd", "The King of Fighters 2000", "Full", "SNK", "Neo Geo", "2000", "kof2000", "neogeo"},
	BDF_GAME_WORKING, 2, HARDWARE_SNK_NEOGEO ,
	NULL, kof2kndRomInfo, kof2kndRomName, neogeoInputInfo, neogeoDIPInfo,
	NeoInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
	nNeoScreenWidth, 224, 4, 3
};

// mslug3nd.zip

static struct BurnRomInfo mslug3ndRomDesc[] = {
	{"256-ph1.bin"   , 0x100000, 0x0, 0x10}, //  0 68K code
	{"256-ph2.bin"   , 0x400000, 0x0, 0x10}, //  0 68K code

	{"ms3n_s1.rom"   , 0x020000, 0x0,    1}, //  1 Text layer tiles

	{"ms3n_c1.rom"   , 0x800000, 0x0,    1}, //  2 Sprite data
	{"ms3n_c2.rom"   , 0x800000, 0x0,    1}, //  3
	{"ms3n_c3.rom"   , 0x800000, 0x0,    1}, //  4
	{"ms3n_c4.rom"   , 0x800000, 0x0,    1}, //  5
	{"ms3n_c5.rom"   , 0x800000, 0x0,    1}, //  6
	{"ms3n_c6.rom"   , 0x800000, 0x0,    1}, //  7
	{"ms3n_c7.rom"   , 0x800000, 0x0,    1}, //  8
	{"ms3n_c8.rom"   , 0x800000, 0x0,    1}, //  9

	{"256-m1.bin"   , 0x080000, 0x0, 0x10}, // 10 Z80 code

	{"256-v1.bin"   , 0x400000, 0x0,    2}, // 11 Sound data
	{"256-v2.bin"   , 0x400000, 0x0,    2}, // 12
	{"256-v3.bin"   , 0x400000, 0x0,    2}, // 13
	{"256-v4.bin"   , 0x400000, 0x0,    2}, // 14
};

STDROMPICKEXT(mslug3nd, mslug3nd, neogeo);
STD_ROM_FN(mslug3nd);

struct BurnDriver BurnDrvmslug3nd = {
	{"mslug3nd", "Metal Slug 3", "Full", "SNK", "Neo Geo", "1999", "mslug3", "neogeo"},
	BDF_GAME_WORKING, 2, HARDWARE_SNK_NEOGEO,
	NULL, mslug3ndRomInfo, mslug3ndRomName, neogeoInputInfo, neogeoDIPInfo,
	NeoInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
	nNeoScreenWidth, 224, 4, 3
};

// mslug3nd.zip

static struct BurnRomInfo rotdRomDesc[] = {
	{"rotd_p1.rom"   , 0x400000, 0x0, 0x10}, //  0 68K code
	{"rotd_p2.rom"   , 0x400000, 0x0, 0x10}, //  0 68K code

	{"rotd_s1.rom"   , 0x020000, 0x0,    1}, //  1 Text layer tiles

	{"rotdn_c1.rom"   , 0x800000, 0x0,    1}, //  2 Sprite data
	{"rotdn_c2.rom"   , 0x800000, 0x0,    1}, //  3
	{"rotdn_c3.rom"   , 0x800000, 0x0,    1}, //  4
	{"rotdn_c4.rom"   , 0x800000, 0x0,    1}, //  5
	{"rotdn_c5.rom"   , 0x800000, 0x0,    1}, //  6
	{"rotdn_c6.rom"   , 0x800000, 0x0,    1}, //  7
	{"rotdn_c7.rom"   , 0x800000, 0x0,    1}, //  8
	{"rotdn_c8.rom"   , 0x800000, 0x0,    1}, //  9

	{"264-m1d.bin"   , 0x010000, 0x0, 0x10}, // 10 Z80 code

	{"264-v1.bin"   , 0x400000, 0x0,    2}, // 11 Sound data
	{"264-v2.bin"   , 0x400000, 0x0,    2}, // 12
	{"264-v3.bin"   , 0x400000, 0x0,    2}, // 13
	{"264-v4.bin"   , 0x400000, 0x0,    2}, // 14
};

STDROMPICKEXT(rotd, rotd, neogeo);
STD_ROM_FN(rotd);

struct BurnDriver BurnDrvrotd = {
	{"rotd", "Rage of the Dragons", "Full", "SNK", "Neo Geo", "2003", NULL, "neogeo"},
	BDF_GAME_WORKING, 2, HARDWARE_SNK_NEOGEO,
	NULL, rotdRomInfo, rotdRomName, neogeoInputInfo, neogeoDIPInfo,
	NeoInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
	nNeoScreenWidth, 224, 4, 3
};
//	Sengoku3n.zip


static struct BurnRomInfo sengoku3nRomDesc[] = {
	{"sen3_p1.rom", 0x200000, 0xd449954e, 0x10}, //  0 68K code

	{"sen3_s1.rom", 0x020000, 0x0,    1}, //  1 Text data

	{"sen3_c1.rom", 0x800000, 0x0,    1}, //  2 Sprite data
	{"sen3_c2.rom", 0x800000, 0x0,    1}, //  3
	{"sen3_c3.rom", 0x800000, 0x0,    1}, //  5
	{"sen3_c4.rom", 0x800000, 0x0,    1}, //  6

	{"Sen3_m1.rom", 0x020000, 0x0, 0x10}, // 11 Z80 code

	{"261-v1.bin", 0x400000, 0x0,    2}, //  12 Sound data
	{"261-v2.bin", 0x400000, 0x0,    2}, //  13
	{"261-v3.bin", 0x400000, 0x0,    2}, //  14
	{"261-v4.bin", 0x200000, 0x0,    2}, //  15
}; 

STDROMPICKEXT(sengoku3n, sengoku3n, neogeo); 
STD_ROM_FN(sengoku3n);


struct BurnDriver BurnDrvsengoku3n = {

	{"sengoku3n", "Sengoku 3", "None", "SNK", "Neo Geo", "2001", "sengoku3" , "neogeo"},
	BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_SNK_NEOGEO |HARDWARE_SNK_SWAPP ,
	NULL, sengoku3nRomInfo, sengoku3nRomName, neogeoInputInfo, neogeoDIPInfo,
	NeoInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
	nNeoScreenWidth, 224, 4, 3
};

// sengoku3.zip

static struct BurnRomInfo sengoku3RomDesc[] = { 
{"261-p1.bin", 0x200000, 0xd449954e, 0x10}, // 0 68K code 

{"261-c1.bin", 0x800000, 0xded84d9c, 1}, // 1 Sprite data 
{"261-c2.bin", 0x800000, 0xb8eb4348, 1}, // 2 
{"261-c3.bin", 0x800000, 0x84e2034a, 1}, // 3 
{"261-c4.bin", 0x800000, 0x0b45ae53, 1}, // 4 

{"261-m1.bin", 0x020000, 0x36ed9cdd, 0x10}, // 3 Z80 code 

{"261-v1.bin", 0x400000, 0x64c30081, 2}, // 1 Sound data 
{"261-v2.bin", 0x400000, 0x392a9c47, 2}, // 2 Sound data 
{"261-v3.bin", 0x400000, 0xc1a7ebe3, 2}, // 3 Sound data 
{"261-v4.bin", 0x200000, 0x9000d085, 2}, // 4 Sound data 
}; 

STDROMPICKEXT(sengoku3, sengoku3, neogeo); 
STD_ROM_FN(sengoku3); 

static int sengoku3Init() 
{ 
nNeoProtectionXor = 0xfe; 
return NeoInit(); 
} 

struct BurnDriver BurnDrvsengoku3 = { 
{"sengoku3", "Sengoku 3", NULL, "SNK", "Neo Geo", "2001", NULL, "neogeo"}, 
BDF_GAME_WORKING, 2, HARDWARE_SNK_NEOGEO | HARDWARE_SNK_SWAPP | HARDWARE_SNK_ENCRYPTED_A | HARDWARE_SNK_SRAM  , 
NULL, sengoku3RomInfo, sengoku3RomName, neogeoInputInfo, neogeoDIPInfo, 
sengoku3Init, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette, 
nNeoScreenWidth, 224, 4, 3 
};

// zintrick

static struct BurnRomInfo zintrickRomDesc[] = {
	{"zin_p1.rom"   , 0x100000, 0x0, 0x10}, //  0 68K code

	{"zin_s1.rom"   , 0x020000, 0x0,    1}, //  1 Text layer tiles

	{"zin_c1.rom"   , 0x200000, 0x0,    1}, //  2 Sprite data
	{"zin_c2.rom"   , 0x200000, 0x0,    1}, //  3

	{"zin_m1.rom"   , 0x020000, 0x0, 0x10}, // 10 Z80 code

	{"zin_v1.rom"   , 0x200000, 0x0,    2}, // 11 Sound data

};

STDROMPICKEXT(zintrick, zintrick, neogeo);
STD_ROM_FN(zintrick);

struct BurnDriver BurnDrvzintrick = {
	{"zintrick", "Zintrick", "Full", "SNK", "Neo Geo", "neocd", NULL, "neogeo"},
	BDF_GAME_WORKING, 2, HARDWARE_SNK_NEOGEO,
	NULL, zintrickRomInfo, zintrickRomName, neogeoInputInfo, neogeoDIPInfo,
	NeoInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
	nNeoScreenWidth, 224, 4, 3
};

// zupapa

static struct BurnRomInfo zupapaRomDesc[] = {
	{"070-p1.bin"   , 0x100000, 0x98a1c67e, 0x10}, //  0 68K code

	{"070-c1.bin"   , 0x800000, 0x0,    1}, //  2 Sprite data
	{"070-c2.bin"   , 0x800000, 0x0,    1}, //  3

	{"070-m1.bin"   , 0x020000, 0x0, 0x10}, // 10 Z80 code

	{"070-v1.bin"   , 0x200000, 0x0,    2}, // 11 Sound data
};

STDROMPICKEXT(zupapa, zupapa, neogeo);
STD_ROM_FN(zupapa);

static int zupapaInit() 
{ 
nNeoProtectionXor = 0xbd; 
return NeoInit(); 
} 

struct BurnDriver BurnDrvzupapa = {
	{"zupapa", "Zupapa", "Full", "SNK", "Neo Geo", "????", NULL, "neogeo"},
	BDF_GAME_WORKING, 2, HARDWARE_SNK_NEOGEO | HARDWARE_SNK_SWAPC | HARDWARE_SNK_ENCRYPTED_A ,
	NULL, zupapaRomInfo, zupapaRomName, neogeoInputInfo, neogeoDIPInfo,
	zupapaInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
	nNeoScreenWidth, 224, 4, 3
};

// zupapan

static struct BurnRomInfo zupapanRomDesc[] = {
	{"zupa_p1.rom"   , 0x100000, 0x0, 0x10}, //  0 68K code

	{"zupa_s1.rom"   , 0x020000, 0x0,    1}, //  1 Text layer tiles

	{"zupa_c1.rom"   , 0x200000, 0x0,    1}, //  2 Sprite data
	{"zupa_c2.rom"   , 0x200000, 0x0,    1}, //  3

	{"zupa_m1.rom"   , 0x020000, 0x0, 0x10}, // 10 Z80 code

	{"070-v1.bin"   , 0x200000, 0x0,    2}, // 11 Sound data

};

STDROMPICKEXT(zupapan, zupapan, neogeo);
STD_ROM_FN(zupapan);

struct BurnDriver BurnDrvzupapan = {
	{"zupapan", "Zupapa", "Full", "SNK", "Neo Geo", "????", "zupapa" , "neogeo"},
	BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_SNK_NEOGEO,
	NULL, zupapanRomInfo, zupapanRomName, neogeoInputInfo, neogeoDIPInfo,
	NeoInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
	nNeoScreenWidth, 224, 4, 3
};

// pochinya

static struct BurnRomInfo pochinyaRomDesc[] = {
	{"267-p1.bin"   , 0x100000, 0x0, 0x10}, //  0 68K code

	{"267-c1.bin"   , 0x800000, 0x0,    1}, //  2 Sprite data
	{"267-c2.bin"   , 0x800000, 0x0,    1}, //  3

	{"267-m1.bin"   , 0x080000, 0x0, 0x10}, // 10 Z80 code

	{"267-v1.bin"   , 0x400000, 0x0,    2}, // 11 Sound data
};

STDROMPICKEXT(pochinya, pochinya, neogeo);
STD_ROM_FN(pochinya);

static int pochinyaInit() 
{ 
nNeoProtectionXor = 0x2f; 
return NeoInit(); 
} 

struct BurnDriver BurnDrvpochinya = {
	{"pochinya", "Pochi Nyaa", "Full", "SNK", "Neo Geo", "????", NULL, "neogeo"},
	BDF_GAME_WORKING, 2, HARDWARE_SNK_NEOGEO | HARDWARE_SNK_SWAPC | HARDWARE_SNK_ENCRYPTED_B ,
	NULL, pochinyaRomInfo, pochinyaRomName, neogeoInputInfo, neogeoDIPInfo,
	pochinyaInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
	nNeoScreenWidth, 224, 4, 3
};

// cthd2003

//====================================
static struct BurnRomInfo cthd2003RomDesc[] = {
	{"5003-p1.bin", 0x100000, 0x0, 0x10}, //  0 68K code
	{"5003-p2.bin", 0x400000, 0x0, 0x10}, //  1

	{"5003-s1.bin", 0x020000, 0x0,    1}, //  2 Text layer tiles

	{"5003-c1.bin", 0x800000, 0x0,    1}, //  3 Sprite data
	{"5003-c2.bin", 0x800000, 0x0,    1}, //  4
	{"5003-c3.bin", 0x800000, 0x0,    1}, //  5
	{"5003-c4.bin", 0x800000, 0x0,    1}, //  6
	{"5003-c5.bin", 0x800000, 0x0,    1}, //  7
	{"5003-c6.bin", 0x800000, 0x0,    1}, //  8
	{"5003-c7.bin", 0x800000, 0x0,    1}, //  9
	{"5003-c8.bin", 0x800000, 0x0,    1}, // 10

	{"5003-m1.bin", 0x020000, 0x0, 0x10}, // 11 Z80 code

	{"262-v1.bin", 0x400000, 0x0,    2}, // 10	Sound data
	{"262-v2.bin", 0x400000, 0x0,    2}, // 11
	{"262-v3.bin", 0x400000, 0x0,    2}, // 12
	{"262-v4.bin", 0x400000, 0x0,    2}, // 12
};

STDROMPICKEXT(cthd2003, cthd2003, neogeo);
STD_ROM_FN(cthd2003);

struct BurnDriver BurnDrvcthd2003 = {
	{"cthd2003", "Crouching Tiger Hidden Dragon 2003", NULL , "SNK", "Neo Geo", "2001", NULL , "neogeo"},
	BDF_GAME_WORKING, 2, HARDWARE_SNK_NEOGEO |HARDWARE_SNK_SWAPP,NULL, cthd2003RomInfo, cthd2003RomName, neogeoInputInfo, neogeoDIPInfo,
	NeoInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
	nNeoScreenWidth, 224, 4, 3
};
//=====================
//====================================

// Power insctinct matrimelee

static struct BurnRomInfo pimnRomDesc[] = {
	{"266-p1.bin"   , 0x100000, 0x0, 0x10}, //  0 68K code
	{"266-p2.bin"   , 0x400000, 0x0, 0x10}, //  0 68K code

	{"266-s1.bin"   , 0x020000, 0x0,    1}, //  1 Text layer tiles

	{"266-c1.bin"   , 0x800000, 0x0,    1}, //  2 Sprite data
	{"266-c2.bin"   , 0x800000, 0x0,    1}, //  3
	{"266-c3.bin"   , 0x800000, 0x0,    1}, //  4
	{"266-c4.bin"   , 0x800000, 0x0,    1}, //  5
	{"266-c5.bin"   , 0x800000, 0x0,    1}, //  6
	{"266-c6.bin"   , 0x800000, 0x0,    1}, //  7
	{"266-c7.bin"   , 0x800000, 0x0,    1}, //  8
	{"266-c8.bin"   , 0x800000, 0x0,    1}, //  9

	{"266-m1.bin"   , 0x010000, 0x0, 0x10}, // 10 Z80 code

	{"266-v1.bin"   , 0x400000, 0x0,    2}, // 11 Sound data
	{"266-v2.bin"   , 0x400000, 0x0,    2}, // 12
	{"266-v3.bin"   , 0x400000, 0x0,    2}, // 13
	{"266-v4.bin"   , 0x400000, 0x0,    2}, // 14
};

STDROMPICKEXT(pimn, pimn, neogeo);
STD_ROM_FN(pimn);


struct BurnDriver BurnDrvPimn = {
	{"pimn", "Power Instinct Matrimelee ", NULL, "SNK", "Neo Geo", "2003", "pim", "neogeo"},
	BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_SNK_NEOGEO,
	NULL, pimnRomInfo, pimnRomName, neogeoInputInfo, neogeoDIPInfo,
	NeoInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
	nNeoScreenWidth, 224, 4, 3
};

// GhostLop

static struct BurnRomInfo ghostlopRomDesc[] = {
{"228-p1.bin", 0x100000, 0x6033172e, 0x10}, // 0 68K code

{"228-s1.bin", 0x020000, 0x83c24e81, 1}, // 1 Text data

{"228-c1.bin", 0x400000, 0xbfc99efe, 1}, // 2 Sprite data
{"228-c2.bin", 0x400000, 0x69788082, 1}, // 3

{"228-m1.bin", 0x020000, 0xfd833b33, 0x10}, // 4 Z80 code

{"228-v1.bin", 0x200000, 0xc603fce6, 2}, // 5 Sound data
}; 

STDROMPICKEXT(ghostlop, ghostlop, neogeo); 
STD_ROM_FN(ghostlop);

struct BurnDriver BurnDrvghostlop = {

{"ghostlop", "GhostLop", NULL, "Data East Corporation ", "Neo Geo", "1996", NULL, "neogeo"},
BDF_GAME_WORKING | BDF_PROTOTYPE, 2, HARDWARE_SNK_NEOGEO,
NULL, ghostlopRomInfo, ghostlopRomName, neogeoInputInfo, neogeoDIPInfo,
NeoInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
}; 

!!!! GAMES after 2001 are not activated !!!!!